import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Creat by TanLei
 * Description:
 * User:86183
 * Date:2022-05-15
 * Time:10:31
 */
public class Demo25 {
    public static void main(String[] args) {
        //ExecutorService pool = Executors.newFixedThreadPool(10);
        ExecutorService pool=Executors.newCachedThreadPool();
        for (int i = 0; i < 100; i++) {
            pool.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hello");
                }
            });
        }

    }
}
